package org.jeecg.modules.demo.jxcx.controller;

import com.alibaba.fastjson.JSONObject;
import org.jeecg.modules.demo.jxcx.Utils.R;
import org.jeecg.modules.demo.jxcx.po.JxcCzrz;
import org.jeecg.modules.demo.jxcx.service.JxcCzrzService;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

@RestController
@RequestMapping({"jxcCzrz"})
public class JxcCzrzController {
    @Resource
    private JxcCzrzService jxcCzrzService;
    @PostMapping("add")
    public R getinfor(@RequestBody JxcCzrz jxcCzrz) {
        return jxcCzrzService.add(jxcCzrz);
    }
    @PostMapping("queryczrz")
    public R queryczrz(@RequestBody JSONObject params) {
        return new R().ok(jxcCzrzService.queryczrz(params.getString("companyId")));
    }
}
